from alg import findContentChildren
from gen import generate_data

def test_algorithm():
    # 生成测试数据
    num_children = 10
    num_cookies = 10
    max_gastronomy = 10
    max_cookie_size = 10

    g, s = generate_data(num_children, num_cookies, max_gastronomy, max_cookie_size)
    
    print("测试数据：")
    print("孩子的胃口值:", g)
    print("饼干的尺寸:", s)

    # 运行算法
    result = findContentChildren(g, s)
    print("最大满足的孩子数量:", result)

if __name__ == "__main__":
    test_algorithm()